ga.view.streaming.showroom
Class BoxShowRoom

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by ga.view.streaming.showroom.ShowRoom
              extended by ga.view.streaming.showroom.BoxShowRoom
All Implemented Interfaces:
com.jme3.asset.CloneableSmartAsset, com.jme3.collision.Collidable, com.jme3.export.Savable, IPhenotypeSpace, java.lang.Cloneable

public final class BoxShowRoom
extends ShowRoom

This is a ShowRoom that has a rectangular floor area. With the walls it is a box.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
static class BoxShowRoom.LightingType
          Enum of the types of lighting.
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint
 
Field Summary
private  math.geom2d.polygon.Rectangle2D bounds
           
private  com.jme3.scene.Geometry floor
           
private  com.jme3.scene.Geometry roof
           
private  com.jme3.scene.Node walls
           
 
Fields inherited from class ga.view.streaming.showroom.ShowRoom
ceilingMaterial, DEFAULT_COLOR, floorMaterial, showRoomSettings, wallMaterial, whiteMaterial
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
BoxShowRoom(com.jme3.asset.AssetManager assetManager, com.jme3.system.AppSettings settings, ShowRoomSettings showRoomSettings)
          Instantiates a new box show room.
 
Method Summary
 boolean contains(math.geom2d.polygon.Polygon2D shape)
          Checks if a shape is inside the space and does not intersect the bounds.
private  void createLightObj(com.jme3.math.Vector3f pos)
          Method for debugging.
private  void createLights()
          Creates the lights.
 com.jme3.material.Material getMaterial()
          Deprecated. This method is only for debugging and will be removed soon.
 math.geom2d.polygon.Rectangle2D getOutterBounds()
          Gets the outter bounds of the space as rectangle.
 float minDistanceToWall(math.geom2d.polygon.Polygon2D shape, float angle)
          Calculates the minimum distance of a shape to a wall.
 
Methods inherited from class ga.view.streaming.showroom.ShowRoom
getShowRoomSettings, getWallMaterial, setPhenotype
 
Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setParent, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

walls

private final com.jme3.scene.Node walls

floor

private final com.jme3.scene.Geometry floor

roof

private final com.jme3.scene.Geometry roof

bounds

private final math.geom2d.polygon.Rectangle2D bounds
Constructor Detail

BoxShowRoom

public BoxShowRoom(com.jme3.asset.AssetManager assetManager,
                   com.jme3.system.AppSettings settings,
                   ShowRoomSettings showRoomSettings)
Instantiates a new box show room.

Parameters:
assetManager - the asset manager
settings - the settings
showRoomSettings - the show room settings
Since:
12.08.2012
Method Detail

createLights

private void createLights()
Creates the lights.

Since:
12.08.2012

createLightObj

private void createLightObj(com.jme3.math.Vector3f pos)
Method for debugging. Attaches a cylinder for every light to show the light origins.

Parameters:
pos - The position of the light.
Since:
12.08.2012

getMaterial

@Deprecated
public com.jme3.material.Material getMaterial()
Deprecated. This method is only for debugging and will be removed soon.

Gets the material.

Returns:
the material
Since:
12.08.2012

contains

public boolean contains(math.geom2d.polygon.Polygon2D shape)
Description copied from interface: IPhenotypeSpace
Checks if a shape is inside the space and does not intersect the bounds.

Parameters:
shape - Shape that has do be in the space.
Returns:
true if the shape is fully inside of the space.

minDistanceToWall

public float minDistanceToWall(math.geom2d.polygon.Polygon2D shape,
                               float angle)
Description copied from interface: IPhenotypeSpace
Calculates the minimum distance of a shape to a wall.

Parameters:
shape - The shape to check for distance to a wall.
angle - The angle of the shape.
Returns:
The minimum distance.

getOutterBounds

public math.geom2d.polygon.Rectangle2D getOutterBounds()
Description copied from interface: IPhenotypeSpace
Gets the outter bounds of the space as rectangle.

Returns:
Bounds rectangle.